package io.renren.modules.generator.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 优惠券列表
 * 
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2023-04-17 00:02:37
 */
@Data
@TableName("coupon")
public class CouponEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 优惠券id
	 */
	@TableId
	private Integer id;
	/**
	 * 用户id
	 */
	private Long userId;
	/**
	 * 优惠金额
	 */
	private Integer preferentialPrice;
	/**
	 * 优惠券类型,0:批量发券,1:单派券,2:单买券
	 */
	private Integer couponType;
	/**
	 * 到期日
	 */
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
	private Date dueDate;

}
